//
//  const.h
//  MailMaster
//
//  Created by wlx on 14/12/26.
//  Copyright (c) 2014年 com.wolianxi. All rights reserved.
//

#import <Foundation/Foundation.h>




/**
 *  随迁农三品
 */

#define kappKeyNCP @"e6d704e6fee4b302b8051b14c7223ce5"
#define kUMappKey @"5785f8a3e0f55acd7500062c"


#define WXappSecrt @"sqnsp2016xxx5sdfeerdfDkjkrg4sdaa"
#define WXappID  @"wxd702d3e348fca3d2"
/**
 *  时间戳
 *
 */
#define SJC  [NSString stringWithFormat:@"%ld",(long)[[NSDate date] timeIntervalSince1970]]
#define FWQSuccess [json[@"code"] isEqualToString:@"200"]
//---------------------------------------------------






#import "MBProgressHUD.h"

#import "Singleton.h"



#import "UIView+XHQ.h"


#import "NSString+Extension.h"
#import "NSString+Helper.h"
#import "UIBarButtonItem+Extension.h"

#import "UIImage+MJ.h"
#import "UIView+Extension.h"
#import "UIView+Masonry_LJC.h"





#import "Masonry.h"




#import "AFNetworking.h"

#import "JSNavigationController.h"
#import "XHQBasicTBVC.h"
#import "MJRefresh.h"


//#import "XMConfig.h"
#import "PushNAVViewController.h"
#import "TabBarViewController.h"

//#import "XMLoginTool.h"

//系统消息  和  反馈消息




#import "XMTextField.h"



#import "UIViewExt.h"

/**
 *  验证码时间
 */
//static int kTimeYZM  = 12;
#define kTimeYZM 60;

/**
 *  广告标示
 *
 *  @param h <#h description#>
 *
 *  @return <#return value description#>
 */
#define GGBS [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]


#define NSDC [NSNotificationCenter defaultCenter]
#define NSUD [NSUserDefaults standardUserDefaults]
#define NSFM [NSFileManager defaultManager]

#define kScreenWidth ([UIScreen mainScreen].bounds.size.width)
#define kScreenHeight ([UIScreen mainScreen].bounds.size.height)

///以十六进制的方式获取颜色
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

//通过RGB获取颜色
#define RGBCOLORA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
/**
 *  通过 尺寸标注图 生成适合各个屏幕的尺寸
 *
 *  @param h 像素值
 *
 *  @return 点值
 */
//#define Height(h) (h * [UIScreen mainScreen].bounds.size.height / 667.0 / 2)

#define Width(w) (w * [UIScreen mainScreen].bounds.size.width / 375.0  / 2)

//#define Height(h) (h* [UIScreen mainScreen].bounds.size.height < 568? 568 :[UIScreen mainScreen].bounds.size.height/ 667.0 / 2);




#define Height(h) ( h* ([UIScreen mainScreen].bounds.size.height < 568.1? 568.0 :[UIScreen mainScreen].bounds.size.height)/ 667.0 / 2)
/**
 * 通过 尺寸标注图 生成适合各个屏幕的尺寸
 *
 *  @param h 点
 *
 *  @return <#return value description#>
 */
#define HeightPT(h) (h * [UIScreen mainScreen].bounds.size.height / 667.0 )

#define WidthPT(w) (w * [UIScreen mainScreen].bounds.size.width / 375.0  )

//-------------------------------------------------------

#define  nslogF NSLog(@"当前方法签名（__PRETTY_FUNCTION__）：%s    %@", __PRETTY_FUNCTION__,self);



#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self
//__weak __typeof(self) weakSelf = self;
#define XHQWeak(strongName,weakName)  __weak __typeof(strongName) (weakName) = (strongName);

#define SJP  [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
/**
 *  边框
 */
#define kMainColorBoradLine   RGBCOLOR(191, 191, 191)
/**
 *  文字颜色
 */
#define kMainColorText   RGBCOLOR(77, 77, 77)

/**
 *  灰色
 */
#define kMainColorDarkGary RGBCOLOR(217, 217, 217)

/**
 *  浅灰
 */
#define kMainColorLightDarkGary RGBCOLOR(242, 242, 242)



#define kMainColorSpearLine RGBCOLOR(220, 220, 220)

/**
 * 按钮颜色
 */
#define kMainColorBTN RGBCOLOR(38, 38, 38)
//蓝色
//#define kMainColorOLD RGBCOLOR(43, 224, 228)
//#define kMainColor RGBCOLOR(77, 77, 77)
#define kMainColor RGBCOLOR(47, 172, 44)
#define kMainTEMPColor RGBCOLOR(77, 77, 77)



//字体
#define kMainFontName [UIFont fontWithName:@"PingFangTC-Light"]

#define kMainFont(sizex)[UIFont fontWithName:@"PingFangTC-Light" size:sizex]
#define kMainFontDefultSize  [UIFont fontWithName:@"PingFangTC-Light" size:17]



//日志输出
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) //NSLog(__VA_ARGS__)
#endif


#ifdef DEBUG
#define XHQLog(...) NSLog(__VA_ARGS__)
#else
#define XHQLog(...) //NSLog(__VA_ARGS__)
#endif


#import <objc/runtime.h>
// 添加id类型属性
#define ASSOCIATED(propertyName, setter, type, objc_AssociationPolicy)\
- (type)propertyName {\
return objc_getAssociatedObject(self, _cmd);\
}\
\
- (void)setter:(type)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), object, objc_AssociationPolicy);\
}

// 添加BOOL类型属性
#define ASSOCIATED_BOOL(propertyName, setter)\
- (BOOL)propertyName {\
NSNumber *value = objc_getAssociatedObject(self, _cmd); return value.boolValue;\
}\
\
- (void)setter:(BOOL)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), @(object), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}

// 添加NSInteger类型属性
#define ASSOCIATED_NSInteger(propertyName, setter)\
- (NSInteger)propertyName {\
NSNumber *value = objc_getAssociatedObject(self, _cmd); return value.integerValue;\
}\
\
- (void)setter:(NSInteger)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), @(object), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}

// 添加float类型属性
#define ASSOCIATED_float(propertyName, setter)\
- (float)propertyName {\
NSNumber *value = objc_getAssociatedObject(self, _cmd); return value.floatValue;\
}\
\
- (void)setter:(float)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), @(object), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}

// 添加double类型属性
#define ASSOCIATED_double(propertyName, setter)\
- (double)propertyName {\
NSNumber *value = objc_getAssociatedObject(self, _cmd); return value.doubleValue;\
}\
\
- (void)setter:(double)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), @(object), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}

// 添加long long类型属性
#define ASSOCIATED_longlong(propertyName, setter)\
- (long long)propertyName {\
NSNumber *value = objc_getAssociatedObject(self, _cmd); return value.longLongValue;\
}\
\
- (void)setter:(long long)object\
{\
objc_setAssociatedObject(self, @selector(propertyName), @(object), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}



//-------------------------网络请求地址------------------------------------


extern NSString * const kNetAdressBase;

//extern NSString * const kNetAdress
/**
 *  APP启动时同步设备信息接口
 */
extern NSString * const kNetAdressUpdate;

//-------------------登陆,退出----------------------------------------------
/**
 *  用户登录验证
 */
extern NSString * const kNetAdressLogin;



//-------------------注册,找回密码--------------------------------------
/**
 *  获取图形验证码
 */
extern NSString *const kNetAdressYZM;

/**
 *  校验图形验证码并发送短信接口
 */
extern NSString * const kNetAdressChekYZM;
/**
 *  验证短信接口
 */
extern NSString * const kNetAdressChekSMS;
/**
 *  注册信息或更改密码接口,找回密码或者注册新用户
 */
//extern NSString * const kNetAdressChangePWD;

//-------------------个人资料编辑-------------------------------------
/**
 *  查个人资料接口
 */
extern NSString * const kNetAdressGetUserInfo;

/**
 *  编辑个人资料接口
 */
extern NSString * const kNetAdressEditUserInfo;


//-------------------旅行购物单-------------------------------------
/**
 *  加入旅行购物单接口
 */
extern NSString * const kNetAdressAddTravelShoppingList;

/**
 *  查询好友委托或者是委托好友列表 或者是好友委托商品列表
 
 */
extern NSString * const kNetAdressQueryTravelShoppingList;

/**
 *  删除旅行购物单中的商品
 */
extern NSString * const kNetAdressRemoveTravelShoppingList;

/**
 *  编辑个人旅行购物单数量接口
 */

extern NSString * const kNetAdressEditMyTravelShoppingList;

/**
 *  更改我的或好友委托我的旅行购物单状态为已购买
 
 */
extern NSString * const kNetAdressChangeTravelShoppingListStatus;



//--------------------意见反馈接口----------------------------------
/**
 *  意见反馈接口
 */

extern NSString * const kNetAdressFeedback;


//-----------------------我的好友---------------------------
/**
 *  添加好友接口
 */
extern NSString * const kNetAdressAddFriend;

/**
 *  查询好友/黑名单接口
 */
extern NSString * const kNetAdressGetFriends;
/**
 *  拉黑或者是从黑名单恢复好友 或单独修改好友备注
 */
extern NSString * const kNetAdressRecoverOrShieldFriend;

/**
 *  用户搜索查询接口
 */
extern NSString * const kNetAdressQueryMemeberList;

//--------------我的收藏------------------------------------
/**
 *  我的收藏列表查询接口
 */
extern NSString * const kNetAdressGetMyFavorites;



/**
 *  我的收藏删除接口
 
 */
extern NSString * const kNetAdressDelMyFavorites;


/**
 *  我的收藏添加接口
 */
extern NSString * const kNetAdressAddMyFavorites;



//----------------消息列表------------------------

/**
 *  消息查询接口
 */
extern NSString * const kNetAdressGetMessages;


/**
 *  消息接受拒绝接口
 */
extern NSString * const kNetAdressAccOrRefMessages;

/**
 *  消息已读接口
 */

extern NSString * const kNetAdressMsgHasRead;

/**
 *  删除消息接口
 */
extern NSString * const kNetAdressDelMsg;


/**
 *  查询购物请求和系统消息是否存在未读接口
 */
extern NSString * const kNetAdressGetNoReadMessage;




//----------------------分享接口----------------------
/**
 *  分享接口
 */
extern NSString * const kNetAdressShareInfo;



extern NSString * const kNetAdressShareH5;





//----------------------旅行购时尚---------------------------------


extern NSString * const kNetAdressTravelFashionList;



//----------------通讯录----------------
/**
 *  废弃了,已有新的
 */
extern NSString * const kNetAdressAdressBook;



//----------------粉丝----------------
/**
 *  关注用户
 */
extern NSString * const kNetAdressAttentionMember;
/**
 *  取消关注
 */
extern NSString * const kNetAdressCancelAttentionMember;



//----------------新查询用户----------------
/**
 *  新查询用户
 */
extern NSString * const kNetAdressSearchMemeberList;



/**
 *  通过用户id查询
 */
extern NSString * const kNetAdressUserInfo;

/**
 *  拉黑
 */
extern NSString * const kNetAdressForbiddenAttentionMember;

/**
 *  解除拉黑
 */

extern NSString * const kNetAdressCancelForbiddenAttentionMember;
/**
 *  粉丝/关注 列表接口
 */

extern NSString * const kNetAdressGetFriendsByType;

/**
 *  获取相互关注的列表
 */
extern NSString * const kNetAdressQueryMutualAttentionsFriendList;

/**
 *  获取个人晒单列表
 */
extern NSString * const kNetAdressGetGlobalExposureList;



/**
 *  消息  购物请求
 */
extern NSString * const kNetAdressGetShoppingMessagesList;


/**
 *  新消息中心消息列表查询接口
 */
extern NSString * const kNetAdressGetSysMessagesList;


/**
 *  评论消息列表查询接口
 */
extern NSString * const kNetAdressGetCommentMessagesList;

/**
 *  赞  消息列表
 */
extern NSString * const kNetAdressGetPraiseMessagesList;


/**
 *  新通讯录上传  member/checkAttentionLinkPeopleInfo.html
 */
extern NSString * const kNetAdressCheckAttentionLinkPeopleInfo;



#import "UIViewController+TopMostViewController.h"

#import "WZLBadgeImport.h"

#import "XMLoginTool.h"

#import "PushNAVViewController.h"

#import "YYModel.h"

//#import "UITableView+FDTemplateLayoutCell.h"


#import "XHQHttpTool.h"

#import <AdSupport/ASIdentifierManager.h>







/**
 * 熊猫注册
 */
extern NSString * const kNetAdressZhuCe;

/**
 *  XM修改密码 知道现在的密码
 */
extern NSString * const kNetAdressChangePWD;



/**
 *  XM 修改密码  不知道之前的密码
 */
extern NSString * const kNetAdressChangePWD2;


/**
 *  意见反馈接口
 */

extern NSString * const kNetAdressFeedback;


/**
 *  返回  {success : 1,
 feedback_url : http://www.xiongmao999.com/feedback/?username=&password=,
 feedback_message : 3,
 message_url : http://www.xiongmao999.com/message/?username=&password=,
 system_message : 2,
 now
 */
extern NSString * const kNetAdressMessgeCount;

/**
 *  用于退出登录接口
 */
extern NSString * const kNetAdressLogout;
